package experiment02;

public class Car extends Auto {
    String air;
    String cd;

    public String getAir() {
        return air;
    }

    public void setAir(String air) {
        this.air = air;
    }

    public String getCd() {
        return cd;
    }

    public void setCd(String cd) {
        this.cd = cd;
    }

    /*无参数构造*/
    public Car() {
        super();
    }

    public Car(int numberOfTires, String color, int weight, float speed,String air,String cd) {
        super(numberOfTires, color, weight, speed);
        this.air = air;
        this.cd = cd;
        System.out.println("这个汽车有" + NumberOfTires + "个轮胎，" + "颜色是" + Color + "重量" + Weight + "吨"
                + "最大行驶" + "速度为" + Speed + "Km/h" + "拥有" + air + "车载空调" + "以及" + cd + "播放设备");
    }

    /*重写方法*/
    @Override
    public void jiasu() {
        System.out.println("小汽车加速");
    }

    @Override
    public void jiansu() {
        System.out.println("小汽车减速");
    }

    @Override
    public void tingche() {
        System.out.println("小汽车停下来了");
    }

/*    @Override
    public void run() {
        System.out.println("这个汽车有" + NumberOfTires + "个轮胎，" + "颜色是" + Color + "重量" + Weight + "吨"
                + "最大行驶" + "速度为" + Speed + "Km/h" + "拥有" + air + "车载空调" + "以及" + cd + "播放设备");
    }*/
}

